#include<stdio.h> 
#include<stdlib.h>
char* strcat(char* str1, char* str2)
{
	int i,j,n,m;
	if(str1==NULL||str2==NULL){
		
		return NULL;
	}
	for (i=0;str1[i]!='\0';i++);
	for (j=0;str2[j]!='\0';j++);
	char *str=(char *)malloc((i+j+1)*sizeof(char *));
	for ( n=0;n<i;n++)
		str[n]=str1[n];
	for(m=n;m<j+i;m++)
		str[m]=str2[m-i];
	return str;
}
int main (){
	
	char a[10]="hello";
	char b[10]="world";
	char *c;
	c=strcat(a,b);
	printf("%s",c);
	return 0;
}
